package com.raycloud.robot.utils;

import java.io.IOException;
import java.io.OutputStream;
import com.alibaba.dubbo.common.utils.JVMUtil;
import java.io.FileOutputStream;
import java.io.File;

static final class JVMUtils$1 implements Runnable{
    final /* synthetic */ String val$resultPath;
    @Override
    public void run(){
        final String dateStr=DateUtil.longToStr(System.currentTimeMillis());
        FileOutputStream jstackStream=null;
        try{
            FileUtils.isChartPathExist(this.val$resultPath);
            jstackStream=new FileOutputStream(new File(this.val$resultPath,dateStr+"\u7684\u7ebf\u7a0b\u6c60\u76d1\u63a7.log"));
            JVMUtil.jstack((OutputStream)jstackStream);
        }
        catch(Throwable t){
            JVMUtils.logger.error("dump jstack error",t);
        }
        finally{
            JVMUtils.access$000().release();
            if(jstackStream!=null){
                try{
                    jstackStream.flush();
                    jstackStream.close();
                }
                catch(IOException ex){
                }
            }
        }
        JVMUtils.access$102(System.currentTimeMillis());
    }
}